package com.etonedu.meals.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class Position implements Parcelable {
    /**
     * high : 885.7615318167955
     * left : 222.5895675122738
     * top : 325.4726307913661
     * width : 608.2634159401059
     */

    private double high;
    private double left;
    private double top;
    private double width;

    public double getHigh() {
        return high;
    }

    public void setHigh(double high) {
        this.high = high;
    }

    public double getLeft() {
        return left;
    }

    public void setLeft(double left) {
        this.left = left;
    }

    public double getTop() {
        return top;
    }

    public void setTop(double top) {
        this.top = top;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeDouble(this.high);
        dest.writeDouble(this.left);
        dest.writeDouble(this.top);
        dest.writeDouble(this.width);
    }

    public Position() {
    }

    protected Position(Parcel in) {
        this.high = in.readDouble();
        this.left = in.readDouble();
        this.top = in.readDouble();
        this.width = in.readDouble();
    }

    public static final Creator<Position> CREATOR = new Creator<Position>() {
        @Override
        public Position createFromParcel(Parcel source) {
            return new Position(source);
        }

        @Override
        public Position[] newArray(int size) {
            return new Position[size];
        }
    };
}
